﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Appsters
{
    public partial class yearView : Form
    {
        private int yearCounter = DateTime.UtcNow.Year; 
        public yearView()
        {
            InitializeComponent();
            DateTime dt = DateTime.UtcNow.Date;
            month.Text = dt.ToString("m");
            year.Text = dt.Year.ToString();

            int yearCounter = DateTime.UtcNow.Year;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            year.Text = ((yearCounter) - 1).ToString();
            yearCounter = int.Parse(year.Text);
        }

        private void exit_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void min_Click(object sender, EventArgs e)
        {
            WindowState = FormWindowState.Minimized;
        }

        private void nextButton_Click(object sender, EventArgs e)
        {
            year.Text = ((yearCounter) + 1).ToString();
            yearCounter = int.Parse(year.Text);
        }

        private void janButton_Click(object sender, EventArgs e)
        {
            month.Text = "January " + yearCounter;
        }

        private void febButton_Click(object sender, EventArgs e)
        {
            month.Text = "February " + yearCounter;
        }

        private void marchButton_Click(object sender, EventArgs e)
        {
            month.Text = "March " + yearCounter;
        }

        private void aprButton_Click(object sender, EventArgs e)
        {
            month.Text = "April " + yearCounter;
        }

        private void mayButton_Click(object sender, EventArgs e)
        {
            month.Text = "May " + yearCounter;
        }

        private void juneButton_Click(object sender, EventArgs e)
        {
            month.Text = "June " + yearCounter;
        }

        private void julButton_Click(object sender, EventArgs e)
        {
            month.Text = "July " + yearCounter;
        }

        private void augButton_Click(object sender, EventArgs e)
        {
            month.Text = "August " + yearCounter;
        }

        private void sepButton_Click(object sender, EventArgs e)
        {
            month.Text = "September " + yearCounter;
        }

        private void octButton_Click(object sender, EventArgs e)
        {
            month.Text = "October " + yearCounter;
        }

        private void novButton_Click(object sender, EventArgs e)
        {
            month.Text = "November " + yearCounter;
        }

        private void decButton_Click(object sender, EventArgs e)
        {
            month.Text = "December " + yearCounter;
        }

        private void year_Click(object sender, EventArgs e)
        {

        }

        private void backButton_Click(object sender, EventArgs e)
        {
            planner plan = new planner();
            plan.ShowDialog();
            this.Hide();
        }
    }
}
